Skip to content

feat(doop): ledger caption, read-only Finished canvas, phone column (CHE-9470) [squash] - #176

Draft
congvc-bot-x99[bot] wants to merge 1 commit into
cheese/mainfrom
agent/x99-claude-sonnet-200k/che-9470-a2a9c9dcbde0
Draft

congvc-bot-x99[bot] wants to merge 1 commit into
cheese/mainfrom
agent/x99-claude-sonnet-200k/che-9470-a2a9c9dcbde0

Conversation

@congvc-bot-x99

@congvc-bot-x99 congvc-bot-x99 Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

What

CHE-9470 (L8 of CHE-9398 plan r5), the canvas side of the A5 ledger. Design lock: design/lifecycle-ui/approved/A5-project-ledger.html and A-phone-390-all-five.html @ 572cc77.

  • Ledger caption "Ledger page. The latest approved designs. It changes only when a locked proposal lands." on the ledger page only. Desktop: a floating bar under the top bar. Phone: a box at the top of the Layers sheet, above Pages.
  • A Finished page opens read only. canEditActivePage = canEditOpenCanvas and the active page not Finished. It gates frame press and drag, Layers rows and menus, delete, paste, drop, rename, ⌘K and shortcut actions, version restore, and the Inspector, element and Page panels.
  • Lock and Unlock keep canEditOpenCanvas (the server leaves them open). Restore is unchanged (PagesPanel).
  • A 409 page_finished refusal shows "Finished pages are read only. Restore the page to edit it." (centralised in req()).
  • Phone column: tabs, caption and the L7 Pages list with its four states (loading, empty, error, disconnected) are unchanged. The landing line is not here (CHE-9448).

Out of scope: landing (CHE-9448), page versions (CHE-9351), lock-port gate (CHE-9385), Trash purge (CHE-9399), CHE-10411, any deploy.

Tests (test-first)

New file tests/ledgerCanvasUi.test.tsx (12 tests): on a Finished page frame edit, delete and move are off and Restore works; a 409 page_finished shows the notice (another 409 stays quiet); the caption shows only on the ledger page; an open page keeps every edit.

Command: bunx vitest run tests/ledgerCanvasUi.test.tsx (CI default config). Run locally with a globalSetup-free config because the host timed out starting workers under load.

Red, before the code (a stub LedgerCaption returning null, no canEditActivePage, no notice):

 × is false on a Finished page and true on an open page and on the ledger page
 × stays false for a viewer on an open page, and the canvas role rule itself does not change
 × shows on the ledger page, with the lead in bold
 × does not delete on ⌫
 × does not move a frame by dragging its row
 × offers no frame edit in the frame menu, only what reads the frame and the lock
 × keeps the lock toggle on the row and hides the eye and the new-frame button
 × shows the read-only notice and still rejects
 Test Files  1 failed (1)
      Tests  8 failed | 4 passed (12)

Green, after the code:

 Test Files  1 passed (1)
      Tests  12 passed (12)

Related existing suites also green: 20 files / 136 tests and 3 files / 67 tests (Layers, registry, frame menu, history, pages, i18n).

Also green locally: bun run typecheck, bun run lint, bun run format:check, bun run doc-lint.

UI gate

UI review pack — head cd2dbed31f14c5764470922d8f2a492735d41365

  • Preview: preview: not available
  • Design: design/lifecycle-ui/approved/A5-project-ledger.html and A-phone-390-all-five.html @ 572cc77
  • Reference frame: NOT-CAPTURED: the doop design tool is not reachable from this run, so the before and after captures are not on a doop frame yet
  • Sibling: design/patterns.yml is not in the repo, so no pattern entry applies; the ledger caption and the Finished read-only rule are new surfaces (no pattern line)
  • Sheet: docs/ux/CHE-9470.yml
  • Visual diff: NOT-RUN (CHE-1485 Layer B pending)
Page Width Before After
a5-ledger-canvas-desktop (ledger page) 1440 NOT-CAPTURED: doop frame; base 0ce30401 capture exists NOT-CAPTURED: doop frame; head cd2dbed3 capture exists
a5-ledger-canvas-desktop (Finished page) 1440 NOT-CAPTURED: doop frame; base capture exists NOT-CAPTURED: doop frame; head capture exists
a5-ledger-phone-390 (ledger page, Layers sheet) 390 NOT-CAPTURED: doop frame; base capture exists NOT-CAPTURED: doop frame; head capture exists
a5-ledger-phone-390 (Finished page, Layers sheet) 390 NOT-CAPTURED: doop frame; base capture exists NOT-CAPTURED: doop frame; head capture exists

The pack is incomplete until the captures sit on a doop frame, so the PR stays draft.

Keep / Change / Remove check (manual until Layer B), read against the sheet and the head captures:

  • Keep: pages-list yes; activity-row-finished yes (server-written, no client change); lock-toggle yes (row and menu keep Lock); restore-page yes (setPageFinished test); copy-frame yes (menu keeps Copy); viewer-rules yes (view role stays false, tested); phone-tabs yes; pages-list-phone yes; state-loading, state-empty, state-error, state-offline yes (L7 PanelState, not touched).
  • Change: ledger-caption yes (bar on the ledger page only); finished-read-only yes; finished-layers yes; finished-notice yes; phone-ledger-caption yes; phone-finished-read-only yes; activity-row-landing and phone-landing-line are CHE-9448, not drawn here.
  • Removed: only finished-frame-edits, which the sheet lists under remove. Nothing else is gone.
  • Gap: the sheet ids are element names, not data-testid values; only the caption has a hook (data-slot="ledger-caption"). The tests find the rest by role and text.

Notes

.context/TECHSTACK.md records the client read-only rule.

…CHE-9470)

L8 of CHE-9398 plan r5.

- canEditActivePage gates every frame-edit entry point on a Finished page.
- Lock and Restore keep their own rule.
- A 409 page_finished shows the read-only notice.
- The ledger page shows its caption: a bar on desktop, a box in the phone
  Layers sheet.
- The landing line stays with CHE-9448.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants